
public class AnimalFactory {

	public Animal newAnimal(AnimalType type) {
		switch (type) {
			case ZEBRA: return new Zebra();
			case TIGER: return new Tiger();
			case ELEPHANT: return new Elephant();
			default: return null;
		}
	}
}
